#include <iostream>
#include <string>

using namespace std;

typedef unsigned char u8;

enum TIMEE
{
    HOUR,
    MIN,
    SEC
};

class TimeCl
{
private:
    u8 hour;
    u8 min;
    u8 sec;

public:
    string output_time() // 输出组织好的字符串
    {
        string nowtime;
        nowtime = to_string(hour) + ':' + to_string(min) + ':' + to_string(sec);
        return nowtime;
    }

    void set_time(u8 t, enum TIMEE T) //设置指定的时间单位的值
    {
        
        switch (T)
        {
        case HOUR:
            hour = t;
            break;
        case MIN:
            min = t;
            break;
        case SEC:
            sec = t;
            break;
        }
    }

    void change_time(u8 t, enum TIMEE T) //修改指定的时间单位的值
    {

        switch (T)
        {
        case HOUR:
            hour += t;
            break;
        case MIN:
            min += t;
            break;
        case SEC:
            sec += t;
            break;
        }
    }
    TimeCl time_difference(TimeCl time1,TimeCl time2);
};

int main()
{
    TimeCl mtime;   //!!此时hour有初始值127
     mtime.set_time(1, HOUR);
    mtime.set_time(00, MIN);
    mtime.set_time(00, SEC);
    cout << mtime.output_time() << endl; 

    mtime.change_time(13, HOUR);
    mtime.change_time(50, MIN);
    mtime.change_time(30, SEC);

    cout << mtime.output_time() << endl;

    return 0;
}